package com.lj.universalframework.utils

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide


@BindingAdapter("android:imgUrlResource", requireAll = false)
fun loadResource(imageView: ImageView, res: Int) {
    imageView.setImageResource(res)
}

@BindingAdapter("android:imgUrl", requireAll = false)
fun load(imageView: ImageView, url: String) {
    Glide.with(imageView.context).load(url).into(imageView)
}
